package br.edu.ufcg.mdaveritas.net;

import java.util.ArrayList;
import java.util.List;

public class Node extends NetObject {

	private List<Node> preSet;
	private List<Node> posSet;
	private String name;
	private Boolean isPlace;
	private int subnet;
	
	public Node(String name) {
		preSet = new ArrayList<Node>();
		posSet = new ArrayList<Node>();
		subnet = 0;
		this.name = name;
	}

	public int getSubnet() {
		return subnet;
	}

	public void setSubnet(int subnet) {
		this.subnet = subnet;
	}

	public Boolean getIsPlace() {
		return isPlace;
	}

	public void setIsPlace(Boolean isPlace) {
		this.isPlace = isPlace;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Node> getPreSet() {
		return preSet;
	}

	public void setPreSet(List<Node> preSet) {
		this.preSet = preSet;
	}

	public List<Node> getPosSet() {
		return posSet;
	}

	public void setPosSet(List<Node> posSet) {
		this.posSet = posSet;
	}
	
	public boolean equals(Object obj) {
		return this.getName().equals(((Node) obj).getName());
	}
	public String toString() {
		return this.getName();
	}
}
